<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "test1".
 *
 * @property int $id
 * @property string|null $name
 * @property int|null $age
 * @property int $test_id
 */
class Test1 extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'test1';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['age', 'test_id'], 'integer'],
            [['test_id'], 'required'],
            [['name'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => '编号',
            'name' => '用户名',
            'age' => '年龄',
            'test_id' => 'Test ID',
        ];
    }
}
